Micron Document
baubs git

Node / mirrors / respira / commits / 6b3752c

Commit 6b3752cfc287a1d20d26d7762b96497cbb753a6a


Parents : 444e31a
Author : Jan-Henrik Bruhn <jan-henrik.bruhn@offis.de>
Date : 2025-12-18T10:21:54+01:00

fix: Remove unused pyodideLoader file

The pyodideLoader was superseded by the worker-based pattern converter (client.ts and worker.ts) which runs Pyodide in a background thread. This legacy code is no longer referenced anywhere in the codebase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Changes

1 files changed, 0 insertions(+), 90 deletions(-)


Diff

diff --git a/src/formats/import/pyodideLoader.ts b/src/formats/import/pyodideLoader.ts
deleted file mode 100644
index 7bbd519..0000000
--- a/src/formats/import/pyodideLoader.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { loadPyodide, type PyodideInterface } from "pyodide";
-
-export type PyodideState = "not_loaded" | "loading" | "ready" | "error";
-
-class PyodideLoader {
- private pyodide: PyodideInterface | null = null;
- private state: PyodideState = "not_loaded";
- private error: string | null = null;
- private loadPromise: Promise<PyodideInterface> | null = null;
-
- /**
- * Get the current Pyodide state
- */
- getState(): PyodideState {
- return this.state;
- }
-
- /**
- * Get the error message if state is 'error'
- */
- getError(): string | null {
- return this.error;
- }
-
- /**
- * Initialize Pyodide and install PyStitch
- */
- async initialize(): Promise<PyodideInterface> {
- // If already ready, return immediately
- if (this.state === "ready" && this.pyodide) {
- return this.pyodide;
- }
-
- // If currently loading, wait for the existing promise
- if (this.loadPromise) {
- return this.loadPromise;
- }
-
- // Start loading
- this.state = "loading";
- this.error = null;
-
- this.loadPromise = (async () => {
- try {
- console.log("[PyodideLoader] Loading Pyodide...");
-
- // Load Pyodide with CDN indexURL for packages
- // The core files will be loaded from our bundle, but packages will come from CDN
- this.pyodide = await loadPyodide();
-
- console.log("[PyodideLoader] Pyodide loaded, loading micropip...");
-
- // Load micropip package
- /*await this.pyodide.loadPackage('micropip');
-
- console.log('[PyodideLoader] Installing PyStitch...');
-
- // Install PyStitch using micropip
- await this.pyodide.runPythonAsync(`
- import micropip
- await micropip.install('pystitch')
- `);*/
- await this.pyodide.loadPackage("pystitch-1.0.0-py3-none-any.whl");
-
- console.log("[PyodideLoader] PyStitch installed successfully");
-
- this.state = "ready";
- return this.pyodide;
- } catch (err) {
- this.state = "error";
- this.error =
- err instanceof Error ? err.message : "Unknown error loading Pyodide";
- console.error("[PyodideLoader] Error:", this.error);
- throw err;
- }
- })();
-
- return this.loadPromise;
- }
-
- /**
- * Get the Pyodide instance (must be initialized first)
- */
- getInstance(): PyodideInterface | null {
- return this.pyodide;
- }
-}
-
-// Export singleton instance
-export const pyodideLoader = new PyodideLoader();

Served by rngit 1.4.2 - Generated in 0.03s